﻿/// <summary>
/// FileName: ICustomFunction.cs
/// Author: Jiang Xiaolong
/// Created Time: 2015.05.12
/// Version: 1.0
/// Company: Sunnytech
/// Function: 自定义数学函数接口；
///
/// Changed By:
/// Modification Time:
/// Discription:
/// </summary>
using System;
using System.Collections.Generic;

namespace Expression.api
{
	public interface ICustomFunction
	{
		/// <summary>
		/// 当前计算结果类型；
		/// </summary>
		Type ExpType { get; set; }

		/// <summary>
		/// 当前输入参数个数，TODO：可以不固定的情况如何处理，暂定将返回值定为-1，并且在函数处理流程中要加入这样的判断；
		/// </summary>
		/// <returns>参数个数；</returns>
		int ParameterNumber();

		/// <summary>
		/// 计算；
		/// </summary>
		/// <param name="args">表达式变量；</param>
		/// <returns>结算结果；</returns>
		object Evaluate(List<ExpressionTree> args);

	}
}



